<?php

/**
 * Description of Login
 *
 * @author fabio
 */

require_once '../../ConfigurationFactory.php';
require_once APP_BL . DS . 'login/LoginBl.php';

class LoginAction {

    public function  __construct() {
        
    }

    public function getAction() {

        $username = "";
        $password = "";

        if(isset($_POST['username']))
	      $username = $_POST['username'];
        if(isset($_GET['username']))
	      $username = $_GET['username'];
        if(isset($_POST['password']))
	      $password = $_POST['password'];
        if(isset($_GET['password']))
	      $password = $_GET['password'];

        $action = new LoginBl();
        $esito = $action->autentica($username, $password);

        if($esito) {
            //Abilita sessione
        }

        return $esito;

    }
   
}

$action = new LoginAction();
$action->getAction();

?>
